package _2025_4_15;

import java.io.*;

public class PrintWrites {
    public static void main(String[] args) throws IOException {
        //创建一个输出流
        FileOutputStream fileOutputStream=new FileOutputStream("D:/temp/java114/abc.txt");
        PrintWriter printWriter=new PrintWriter(fileOutputStream);
        printWriter.println("abc");
        printWriter.print("def");
        printWriter.printf("sss");
        printWriter.flush();
        //fileOutputStream.flush(); //是printWriter写入  不需要fileOutputStream刷新缓冲区
        //

    }
}
